package com.walle.rabbitservice.controller;

import com.walle.common.dto.MailDto;
import com.walle.rabbitservice.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangjiapeng
 * @Package com.walle.rabbitservice.controller
 * @Description: ${todo}
 * @date 2018/12/27 14:25
 */
@RestController
@RequestMapping("/rabbit/mail")
public class MailController {

    @Autowired
    private MailService mailService;

    @PostMapping("/send")
    public void send(@RequestBody MailDto mailDto){
        mailService.sendMail(mailDto);
    }
}
